function aplicarRed=aplicarRed(patrones,w,N,b)
	TANH=1;
	EXP=2;
	LINEAL=3;
	FUNC=TANH;

	aplicarRed=[];
	for i=1:rows(patrones)	
		patron=v{1}=horzcat(patrones(i,:),-1); %seteo el inicixal
		for k=2:length(N)-1
			v{k} = applyG(b, (w{k-1}*v{k-1}')', FUNC); %'
			v{k} = horzcat(v{k},-1);
		endfor
		aux = applyG(b,(w{k}*v{k}')', LINEAL); %';
		aplicarRed=[aplicarRed, aux];
	endfor
endfunction
